/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package managedBeans;

import facade.SuiLibFacade;
import facade.exception.NotExistingObjectException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;
import valueObject.ProfessorVO;
import valueObject.UserVO;

/**
 *
 * @author David
 */
@ManagedBean
public class usersMB {

    private String username;
    private String password;
    /**
     * Creates a new instance of usersMB
     */
    
    @EJB
    SuiLibFacade suilibFacade;
    public usersMB() {
    }

    /**
     * @return the username
     */
    public String getUsername() {
        return username;
    }

    /**
     * @param username the username to set
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * @return the password
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }
    
    
    public String getNameLogued() {
//        try {
//            ProfessorVO vo = suilibFacade.findProfessorVOById("unal");
//        } catch (NotExistingObjectException ex) {
//            Logger.getLogger(usersMB.class.getName()).log(Level.SEVERE, null, ex);
//        }
//        System.out.println("");
//        return ((UserVO) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("user")).getUsername();
        return "";
    }
}
